package resx

var MsgFlags = map[int]string{
	Success:    "ok",
	Fail:       "fail",
	NilResult:  "空数据",
	BeOccupied: "已被占用",

	AuthPass:        "允许访问",
	AuthRefuse:      "拒绝访问",
	AuthUnsupported: "未发送 Token",
	AuthEmpty:       "未携带 Token",
	AuthExpire:      "Token 已过期",

	BadRequest:        "请求参数有误",
	SizeLimitExceeded: "文件大小超出限制",
	TypeNotAllowed:    "文件类型不允许",
	DealExpire:        "交易超时已取消",
	OutOfRange:        "超出范围",

	SystemErr: "服务器发生未知错误",
}

func GetMsg(code int) string {
	msg, ok := MsgFlags[code]
	if ok {
		return msg
	}
	return MsgFlags[SystemErr]
}
